package com.example.springboot.mybatisflex.task;

import com.example.springboot.mybatisflex.service.TransactionDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author wwl
 * @version 1.0
 * @date 2024/10/18 14:11
 * @description:
 */
@Slf4j
@Component
public class TransactionDataTask implements ApplicationRunner {
    @Autowired
    private TransactionDataService transactionDataService;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("开始执行TransactionDataTask任务");

        transactionDataService.findData();
        log.info("结束执行TransactionDataTask任务");

    }
}
